home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / jots.zip / SCORE.BAS < prev    next >
BASIC Source File  |  1989-03-13  |  977b  |  44 lines

  1. ' SCORE.BAS: This module handles the Score box and tabulates the score
  2. ' $INCLUDE: 'J.INC'
  3.  
  4. DIM SHARED Score, ScoreSet(1 TO 20)
  5. DIM SHARED MyBox AS BoxType, TopRow, BotRow, LftCol, RtCol
  6. ScoreDefs:
  7.     DATA 100, 95, 90, 85, 80, 75, 70
  8.     DATA 65, 60, 55, 50, 45
  9.     DATA 40, 40, 40, 40, 35, 35, 35, 35
  10.  
  11. SUB InitScore
  12.     CALL BoxCoords(ScoreBox, MyBox)
  13.     TopRow = MyBox.TopRow
  14.     BotRow = MyBox.BotRow
  15.     LftCol = MyBox.LftCol
  16.     RtCol = MyBox.RtCol
  17.  
  18.     RESTORE ScoreDefs
  19.     FOR Lp = 1 TO 20
  20.         READ ScoreSet(Lp)
  21.     NEXT Lp
  22.     Score = 0
  23.  
  24.     NormalBox (ScoreBox)
  25.     COLOR Normal, Background, Background
  26.     LOCATE TopRow + 1, LftCol + 2, 0
  27.     PRINT "Score";
  28.     LOCATE TopRow + 3, LftCol + 3, 0
  29.     PRINT USING "###"; Score;
  30. END SUB
  31.  
  32. SUB AddToScore (Points)
  33.     Score = Score + Points
  34.     LOCATE TopRow + 3, LftCol + 3, 0
  35.     COLOR Normal, Background, Background
  36.     PRINT USING "###"; Score;
  37. END SUB
  38.  
  39. FUNCTION GuessScore (GuessNumber%)
  40.     GuessScore = ScoreSet(GuessNumber%)
  41. END FUNCTION
  42.  
  43.  
  44.